Imaging apparatus and recording medium

ABSTRACT

As shown in FIG.  2 B, a photographing area is divided into a plurality of blocks. The block at the center of the photographing area is defined as an observation block  31 , and the blocks at the periphery of the photographing area are defined as background blocks  32 . When the number of background blocks  32  having the largest number of identical motion vectors is larger than a threshold m, when the scalar quantity of the motion vectors of these background blocks  32  with the largest number is larger than a threshold v, and when the scalar quantity of the motion vector of the observation block  31  is smaller than a threshold vc, the digital camera  1  judges that the user is performing a follow shot and there is no blurring of the observed photographic subject, and performs an automatic shooting.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority fromthe prior Japanese Patent Application No. 2007-302768, filed Nov. 22,2007, the entire contents of which is incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an imaging apparatus and a programthereof, and particularly, relates to an imaging apparatus having anautomatic shooting function and a program thereof.

2. Description of the Related Art

Conventionally, digital cameras equipped with an automatic shootingfunction have been devised.

For example, Japanese Laid-Open (Kokai) Patent Application 2001-235782discloses an art which, when a detected angular velocity or angularacceleration of a camera satisfies a certain condition, judges that afollow shot (i.e., a shooting technique in which a user shoots a movingsubject while moving the camera) is being performed, and automaticallyshoots an image.

SUMMARY OF THE INVENTION

In accordance with one aspect of the present invention, there isprovided an imaging apparatus comprising: an imaging element; a motionvector detecting section which detects motion vectors based on an imagedata imaged by the imaging element; a judging section which judgeswhether or not motion vectors in a first region of the image datadetected by the motion vector detecting section satisfy a firstcondition, and motion vectors in a second region of the image datadetected by the motion vector detecting section satisfy a secondcondition; and an automatic shooting control section which controls theimaging element to automatically shoot a still image, when judged by thejudging section that the motion vectors in the first region satisfy thefirst condition and the motion vectors in the second region satisfy thesecond condition.

In accordance with another aspect of the present invention, there isprovided a computer-readable storage medium having an imaging processingprogram stored thereon that is executable by a computer that includes animaging element to perform functions comprising: a first process whichdetects motion vectors based on an image data imaged by the imagingelement; a second process which judges whether or not motion vectors ina first region of the image data detected by the first process satisfy afirst condition, and motion vectors in a second region of the image datadetected by the first process satisfy a second condition; and a thirdprocess which automatically shoots a still image by the imaging element,when judged by the second process that the motion vectors in the firstregion satisfy the first condition and the motion vectors in the secondregion satisfy the second condition.

The above and further objects and novel features of the presentinvention will more fully appear from the following detailed descriptionwhen the same is read in conjunction with the accompanying drawings. Itis to be expressly understood, however, that the drawings are for thepurpose of illustration only and are not intended as a definition of thelimits of the invention.

BRIEF DESCRIPTION OF THE DRAWING

FIG. 1 is a block diagram of a digital camera according to an embodimentof the present invention;

FIG. 2A is a diagram showing motion vectors that are detected when auser is attempting to perform a follow shot by moving the digital camera1 toward the left while a through image is being displayed;

FIG. 2B is a diagram showing one example of an observation block 31 andbackground blocks 32 in a photographing area;

FIG. 3 is a flowchart showing an operation of the digital camera 1according to the embodiment; and

FIG. 4 is a flowchart showing an operation of the digital camera 1according to the embodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The present invention will hereinafter be described in detail withreference to the preferred embodiments shown in the accompanyingdrawings as an example of application of the imaging apparatus of thepresent invention to a digital camera.

[Embodiment]

A. Configuration of the Digital Camera

FIG. 1 is a block diagram showing an electric schematic of a digitalcamera 1 according to the present embodiment.

The digital camera 1 includes an imaging lens 2, a lens driving block 3,a shutter-aperture 4, a charge-coupled device (CCD) 5, a vertical driver6, a timing generator (TG) 7, a unit circuit 8, a direct memory access(DMA) controller (hereinafter referred to as “DMA”) 9, a centralprocessing unit (CPU) 10, a key input section 11, a memory 12, a dynamicrandom access memory (DRAM) 13, a DMA 14, a motion vector detectingsection 15, a DMA 16, an image generating section 17, a DMA 18, a DMA19, a display section 20, a DMA 21, a compression and extension section22, a DMA 23, a flash memory 24, and a bus 25.

The imaging lens 2 includes a focus lens and a zoom lens consisting of aplurality of lens groups not shown, and is connected with the lensdriving block 3. The lens driving block 3 includes a focus motor, a zoommotor (which are not shown), a focus motor driver and a zoom motordriver (which are not shown). The focus motor and the zoom motorrespectively drive the focus lens and the zoom lens in the optical axisdirection. The focus motor driver and the zoom motor driver respectivelydrive the focus motor and the zoom motor in adherence to a controlsignal sent from the CPU 10.

The shutter-aperture 4 includes a driver circuit not shown. The drivercircuit activates the shutter-aperture 4 in adherence to a controlsignal sent from the CPU 10. The shutter-aperture functions as anaperture and a shutter.

The aperture refers to a mechanism that controls an amount of lightirradiated from the imaging lens 2. The shutter refers to a mechanismthat controls a period of time during which light is irradiated to theCCD 5. The period of time during which light is irradiated to the CCD 5varies depending on a speed at which the shutter is opened and closed(that is, a shutter speed). The exposure can be determined based on theaperture and the shutter speed.

The CCD 5 is driven for scanning by the vertical driver 6, and afterphoto-electrically converting the light intensity of the respectivecolors in the RGB value of a photographic subject image to an imagingsignal at a constant cycle, and outputs the imaging signal to the unitcircuit 8. The CPU 10 controls the operation timings of the verticaldriver 6 and the unit circuit 8 via the TG 7. Note that the CCD 5 hasthe color filters of Bayer array, and also has a function of anelectronic shutter. The CPU 10 controls the shutter speed of theelectronic shutter via the vertical driver 6 and the TG 7.

The TG 7 is connected to the unit circuit 8. The unit circuit 8 includesa correlated double sampling (CDS) circuit, an automatic gain control(AGC) circuit, and an analog-to-digital (A/D) converter. The CDS circuitperforms correlated double sampling on an imaging signal outputted fromthe CCD 5 and holds the sampled imaging signal. The AGC circuit performsautomatic gain control on the sampled imaging signal. The A/D converterconverts the automatic-gain-controlled analog imaging signal to adigital signal. The imaging signal outputted from the CCD 5 is stored ina state of Bayer data in the buffer memory (DRAM 13), via the unitcircuit 8.

The CPU 10 is a one-chip microcomputer having a function that performsAE processing, AF processing, imaging processing and the like, andcontrols each section of the digital camera 1. The CPU 10 also includesa clock circuit which clocks date and time.

Particularly, the CPU 10 has following three functions: a function ofjudging whether or not the number of background blocks having thelargest number of identical motion vectors is larger than a threshold mand whether or not the scalar quantity of the motion vectors of thesebackground blocks with the largest number is larger than a threshold v;a function of judging whether or not the scalar quantity of the motionvector-of an observation block is smaller than a threshold vc; and afunction of automatically shooting a still image when judged that thenumber of background blocks having the largest number of identicalmotion vectors is larger than the threshold m and the scalar quantity ofthe motion vectors of these background blocks with the largest number islarger than the threshold v, and also judged that the scalar quantity ofthe motion vector of the observation block is smaller than the thresholdvc.

Note that explanation will be given later on the background blocks andthe observation block. The positions of the background blocks and theobservation block are closely related to a follow shot.

The key input section 11 includes a plurality of operation keys such asa shutter button enabling both half-depression and full-depression, anda mode selection key, and outputs operational signals that correspond tothe key operations performed by the user to the CPU 10.

The memory 12 stores a control program required for the CPU 10 tocontrol each section of the digital camera 1 and necessary data (thethreshold m, the threshold v, the threshold vc, etc.), and the CPU 10operates in accordance with the program.

The DRAM 13 is used as a buffer memory for temporarily storing imagedata imaged by the CCD 5, and also used as a working memory of the CPU10.

The DMA 14 reads out Bayer data or luminosity color-difference signalimage data to be described later which has been stored in the buffermemory, and outputs it to the motion vector detecting section 15.

The motion vector detecting section 15 detects motion vectors of acertain area in frame image data. The motion vectors in the image datais detected by the representative point matching method, the blockmatching method, or the like.

In the present embodiment, imaged frame image data (the present frameimage data) is divided into a plurality of blocks (m pixels×n pixelseach). Then, based on the image data of the respective divided blocks(respective areas) and on frame image data (the preceding frame imagedata) imaged before the present frame image data, the motion vectors ofthe respective blocks are detected. Accordingly, a memory circuit forholding imaged frames for a certain period of time is also included inthe motion vector detecting section 15.

The motion vector detecting section 15 herein detects motion vectorsonly of background blocks and an observation block among all image dataof the respective divided blocks, whereby the load of the motion vectordetecting process can be reduced. Note that the detected motion vectorsare sent to the CPU 10 via the DMA 14.

The DMA 16 reads out image data in Bayer data format stored in thebuffer memory (DRAM 13), and outputs it to the image generating section17.

The image generating section 17 executes processing such as pixelinterpolation processing, gamma correction processing, and white balanceprocessing on image data sent from the DMA 16, and also generatesluminosity color difference signals (YUV data). In short, the imagegenerating section 17 executes image processing.

The DMA 18 stores, in the buffer memory, luminosity color-differencesignal image data (YUV data) on which image processing has beenperformed in the image generating section 17.

The DMA 19 outputs image data in YUV data format stored in the buffermemory to the display section 20.

The display section 20 includes a color LCD and a driver circuitthereof, and displays the image of image data outputted from the DMA 19.

The DMA 21 outputs image data in YUV data format and compressed imagedata stored in the buffer memory to the compression and extensionsection 22. It also stores image data compressed and extended by thecompression and extension section 22 in the buffer memory.

The compression and extension section 22 is a section that performscompression and extension (for example, compression and extension in aJoint Photographic Experts Group (JPEG) format or a Moving PictureExperts Group (MPEG) format, etc.) of image data.

The DMA 23 reads out compressed image data stored in the buffer memoryand stores it in the flash memory 24. It also stores compressed imagedata stored in the flash memory 24 in the buffer memory.

B. Follow Shot Relationship Between an Observation Block and BackgroundBlocks

“Follow shot” in the present embodiment refers to a shooting techniquein which the user shoots a moving observed photographic subject whilemoving the digital camera 1.

When the user performs a follow shot, the user usually moves the digitalcamera 1 along with the movement of an observed photographic subject, sothat the observed photographic subject is positioned at the center ofthe photographing area. Therefore, the observed photographic subjectshould exist at the center of the photographing area substantially in afixed state, and the background should be moving in a direction oppositeto the direction to which the observed photographic subject is moving.

Accordingly, the motion vectors of the background should be directed inone direction, and the motion vector of the observed photographicsubject should be different from the motion vectors of the background(that is, the motion vectors of the background and the motion vector ofthe observed photographic subject have clearly different direction andquantity). Note that in the case where the user accurately captures theobserved photographic subject at the center of the photographing area,the motion vector of the observation block should be substantially 0.

FIG. 2A is a diagram showing one example of the motion vectors detectedwhen the user is attempting to perform a follow shot by moving thedigital camera 1 toward the left, while the through image is beingdisplayed. As can be seen from FIG. 2A, the motion vectors of thebackground 42 (hereinafter referred to as “background motion vectors42”) are directed in one direction, and the motion vector 41 of theobserved photographic subject 43 is different from the background motionvectors 42.

Applying this principle, the positions of the observation block 31 andthe background blocks 32 are defined.

In other words, because the observed photographic subject 43 isconsidered to be positioned at the center of the photographing area, theblock at the center of the photographing area is defined as theobservation block 31. Further, the blocks at the periphery of thephotographing area, in which the observed photographic subject 43 is notconsidered to exist, are defined as the background blocks 42.

FIG. 2B is a diagram showing one example of the observation block 31 andthe background blocks 32.

As can be seen from FIG. 2B, frame image data is divided into aplurality of blocks. As shown in FIG. 2B, the peripheral blocks 32(i.e., the blocks shown by hatched lines) at the outermost of thephotographing area are defined as the background blocks, and the block31 (i.e., the block shown by vertical lines) at the center of thephotographing area is defined as the observation block. Each of thebackground blocks 32 is assigned with an address. Since the number ofthe background blocks 32 is 40 as shown in FIG. 2B, the addresses 1 to40 are assigned to the respective background blocks 32.

In the case where the number of background blocks 32 having identicalmotion vectors is larger than the threshold m, and the scalar quantityof the motion vectors 42 of these background blocks 32 is larger thanthe threshold v, and further, when the scalar quantity of the motionvector 41 of the observation block 31 is smaller than the threshold vc,the digital camera 1 judges that the digital camera 1 is in a statewhere the user is attempting to perform a follow shot and that there isno blurring of the observed photographic subject, and subsequentlyperforms automatic shooting based on the judgment.

One of the reasons why such judgment is determined as the condition forautomatically shooting an image is that, if the scalar quantity of themotion vectors 42 of the background blocks 32 is smaller than thethreshold v and the scalar quantity of the motion vector 41 of theobservation block 31 is smaller than the threshold vc, it means that theuser is not attempting to perform a follow shot, but is merelyattempting to shoot a stationary subject with the digital camera 1fixed. Another reason is that, if the scalar quantity of the motionvectors 42 of the background blocks 32 is larger than the threshold vand the scalar quantity of the motion vector 41 of the observation block31 is larger than the threshold vc, it means that the user is merelypanning the camera to a stationary subject.

Herein, whether or not “the number of background blocks 32 havingidentical motion vectors is larger than the threshold m” is judged,rather than whether or not “the motion vectors of the background blocks32 are all identical.” This is because, since the user is shooting animage while moving the digital camera 1, the detection of the motionvectors 42 of the background blocks 32 is likely to fail, and thus themotion vectors 42 cannot be always detected accurately in all backgroundblocks 32. For example, in the case where the image of the backgroundblocks 32 of the present frame image data does not exist in the previousframe image data, the detection of the motion vectors 42 of thebackground blocks 32 will fail.

Note that the observation block 31 is herein defined as the block at thecenter of frame image data. However, the observation block 31 may be anyblock in the vicinity of the center. In addition, the background blocks32 are herein defined as all blocks positioned at the outermost of frameimage data. However, the background blocks 32 need not be all blocks atthe outermost, or they need not be blocks at the outermost. The point isthat, the block in which the subject at the center is thought todefinitely exist should be determined as the observation block 31, andthe blocks in which the observed photographic subject is thought to notexist and which are thought to be always the backgrounds should bedetermined as the background blocks 32.

C. Operations of the Digital Camera 1

The operation of the digital camera 1 according to the embodiment willhereinafter be described with reference to flowcharts of FIGS. 3 and 4.

When an auto-follow shot mode is set by the user's operation of the modeselection key in the key input section 11, the CPU 10 starts to image asubject using the CCD 5 at a predetermined frame rate, and starts aso-called through image display (Step S1). In the through image display,the display section 20 displays the frame image data of luminosity colordifference signals that have been sequentially generated by the imagegenerating section 17 and stored in the buffer memory (DRAM 13).

Next, the CPU 10 judges whether or not the user has given an instructionto start auto-shuttering (Step S2). This judgment is made based onwhether or not an operational signal corresponding to half-depression orfull-depression of the shutter button has been sent from the key inputsection 11. The user performs the half-depression or the full-depressionof the shutter button when the user has started a follow shot of theobserved photographic subject and thinks that the auto shutter can bereleased at any time.

When judged at Step S2 that the user has not given an instruction tostart auto-shuttering, the CPU 10 stays at Step S2 until an instructionto start auto-shuttering is given. When judged that the user has givenan instruction to start auto-shuttering, the CPU 10 acquires a totalnumber a of the background blocks 32 from the memory 12 (Step S3).

Since the background blocks 32 are herein defined as shown in FIG. 2B,the number a of the background blocks 32 to be acquired should be 40.

Next, the CPU 10 outputs the frame image data that have beensequentially imaged to the motion vector detecting section 15, andcontrols the motion vector detecting section 15 to start detecting themotion vectors of the observation block 31 and of the individualbackground blocks 32 of each frame image data imaged (Step S4).

Next, the CPU 10 acquires the detected motion vectors of the observationblock 31 and of the individual background blocks 32 of the frame imagedata most recently imaged (Step S5).

Next, the CPU 10 sets as “Reference block n0=1” and “Max=0” (Step S6).“Reference block n0=1” means setting the background block 32 having theaddress “1” to the reference block n0. The address of the backgroundblock 32 set to the reference block n0 is stored in the reference blockstorage region of the buffer memory.

In addition, “Max” means the largest number of background blocks 32having identical motion vectors (that is, the largest number ofidentical motion vectors among all motion vectors of the backgroundblocks 32). “Max=0” means setting the largest number to 0. The setlargest number is stored in the Max storage region of the buffer memory.

Next, the CPU 10 judges whether or not the motion vector Vn0 of the setreference block n0 exists in the motion vectors of the blocks acquiredat Step S5 (Step S7). In this judgment, the CPU 10 judges whether or notthe motion vector of the reference block n0 exists based on the addressthat is currently stored in the reference block storage region.

In the case where the detection of the motion vector of the backgroundblock 32 set as “reference block=n0” by the motion vector detectionprocess fails, the CPU 10 judges that no motion vector of the referenceblock n0 exists. This is because a motion vector of the backgroundblocks 32 is not always detected.

When judged at Step S7 that the motion vector of the reference block n0exists, the CPU 10 sets as “Comparison block n1=1”, and as “Count=0”(Step S8). “Comparison block n1=1” means setting background blocks 32having the address 1 to the comparison block n1. The addresses of thebackground blocks 32 set to the comparison block n1 is stored incomparison block storage region of the buffer memory.

In addition, “Count” means the count number of background blocks 32having motion vectors identical to the present reference block n0.“Count=0” means setting the count number to 0. The set count number isstored in the Count storage region of the buffer memory.

Next, the CPU 10 judges whether or not the motion vector Vn1 of the setcomparison block n1 exists in the motion vectors of the blocks acquiredat Step S5 (Step S9). In this judgment, the CPU 10 judges whether or notthe motion vector of the set comparison block n1 exists based on theaddress that is currently stored in the comparison block storage region.

As described above, in the case where the detection of the motion vectorof the background blocks 32 set to “reference block=n1” by the motionvector detection process fails, the CPU 10 judges that no motion vectorof the set comparison block n1 exists.

When judged at Step S9, that the motion vector Vn1 of the comparisonblock n1 exists, the CPU 10 compares the motion vector Vn0 of thecurrently-set reference block n0 with the motion vector Vn1 of thecurrently-set comparison block n1 so as to judge whether or not themotion vector Vn0 and the motion vector Vn1 are the same (Step S10).

When judged at Step S10 that the motion vector Vn0 and the motion vectorVn1 are the same, the CPU 10 sets the Count to “Count=Count+1” (StepS11), and proceeds to Step S12. In other words, the CPU 10 incrementsthe number of the Counts at Step S11. The incremented number is storedin the Count storage region.

On the contrary, when judged at Step S9 that no motion vector Vn1 of thecomparison block n1 exists, or when judged at Step S10 that the motionvector Vn0 and the motion vector Vn1 are not the same, the CPU 10proceeds to Step S12 without executing other processes.

At Step S12, the CPU 10 judges whether or not the currently-setcomparison block n1 is “Comparison block n1=a”, that is, whether or notthe address number of the background blocks 32 set to the comparisonblock n1 is the same as the total number a of the background blocks. Inother words, the CPU 10 judges whether or not all background blocks 32have been set as the comparison block n1. This judgment is made based onthe address that is currently stored in the comparison block storageregion.

When judged at Step S12 that the comparison block n1 is not “comparisonblock n1=a”, the CPU 10 sets the comparison block n1 to “comparisonblock n1=n1+1” (Step S13), and returns to Step S9.

In other words, the CPU 10 increments the address of the backgroundblock 32 to be set as the comparison block n1. For example, in the casewhere the background block 32 with the address 2 is currently set as acomparison block, the background block 32 with the address 3 should beset as the comparison block. In accordance with this, the address storedin the comparison block storage region is also incremented.

As a result, the CPU 10 compares the motion vector of the backgroundblock 32 currently set as the reference block n0 with the motion vectorsof all background blocks 32, so as to count the number of backgroundblocks 32 having motion vectors identical to that of the backgroundblock 32 set as the reference block n0.

On the contrary, when judged at Step S12 that the comparison block n1 is“comparison block n1=a”, that is, when judged that the CPU 10 has setall background blocks 32 as the comparison block n1, the CPU 10 judgeswhether or not the Count is larger than the Max (Step S14). In otherwords, the CPU 10 judges whether or not the count number stored in theCount storage region is larger than the largest number stored in the Maxstorage region.

When judged at Step S14 that the Count is larger than the Max, the CPU10 sets the number of the Count to Max (and stores the count numberstored in the Count storage region in the Max storage region), and setsthe motion vector Vn0 of the background block 32 currently set as thereference block n0 to the greatest motion vector V in the backgroundblocks 32 (Step S15). Then, the CPU 10 proceeds to Step S16.

By setting the motion vector V, the motion vector of the backgroundblock 32 currently set as the reference block n0 overwrites and isstored in the motion vector storage region.

On the contrary, when judged at Step S7 that the motion vector Vn0 ofthe reference block n0 does not exist, and further judged at Step S14that the number of the Count is not larger than the Max, the CPU 10proceeds to Step S16 without executing other processes.

At Step S16, the CPU 10 judges whether or not the currently-setreference block n0=a, in other words, whether or not the address numberof the background block 32 currently set to the reference block n0 isthe same as the total number a of the background blocks. That is, theCPU 10 judges whether or not all background blocks 32 have been set asthe reference block n0. This judgment is made based on the address thatis currently stored in the reference block storage region.

When judged at Step S16 that the reference block n0 is not “referenceblock n0=a”, the CPU 10 sets the reference block n0 to “reference blockn0=n0+1” (Step S17), and returns to Step S7.

In other words, the CPU 10 increments the address of the backgroundblock 32 to be set as the reference block n0. For example, in the casewhere the background block 32 with the address 2 is currently set as thereference block n0, the background block 32 with the address 3 should beset as the reference block n0. In accordance with this, the addressstored in the reference block storage region is also incremented.

As a result, by setting all background blocks 32 as the reference blockn0, each of the motion vectors of each background block 32 is comparedwith the motion vectors of all background blocks 32, whereby the numberof background blocks having motion vectors identical to that of eachbackground block 32 is counted. Accordingly, the Count number with thelargest count number is set as the Max, and the motion vector which hasthe largest Count number is set as the motion vector V.

On the contrary, when judged at Step S16 that the reference block n0 is“reference block n0=a”, that is, when judged that all background blocks32 have been set as the reference block n0, the CPU 10 proceeds to StepS21 in FIG. 4. At Step S21, the CPU 10 judges whether or not thecurrently-set Max is larger than the threshold m, and whether or not thescalar quantity of the currently-set motion vector V is larger than thethreshold v. In other words, the CPU 10 judges whether or not thelargest number stored in the Max storage region is larger than thethreshold m, and whether or not the scalar quantity of the motion vectorstored in the motion vector storage region is larger than the thresholdv.

When judged at Step S21 that the currently-set Max is larger than thethreshold m, and the scalar quantity of the currently-set motion vectorV is larger than the threshold v, the CPU 10 judges whether or not themotion vector Vc of the observation block 31 exists in the motionvectors of the blocks acquired at Step S5 in FIG. 3 (Step S22).

When judged at Step S22 that the motion vector Vc of the observationblock 31 exists, the CPU 10 judges whether or not the scalar quantity ofthe motion vector Vc of the observation block 31 is smaller than thethreshold vc (Step S23).

When judged at Step S23 that the scalar quantity of the motion vector Vcof the observation block 31 is smaller than the threshold vc, the CPU 10performs an automatic shooting record process (follow shot) (Step S24).In other words, even when no operation instruction is given by the user,the CPU 10 automatically performs a still image pick-up record process(follow shot), and records the compressed still image data in the flashmemory 24 via the DMA 23.

On the contrary, when judged at Step S21 that the currently-set Max isnot larger than the threshold m, or the scalar quantity of thecurrently-set motion vector V is not larger than the threshold v, whenjudged at Step S22 that the motion vector Vc of the observation block 31does not exist, or when judged at Step S23 that the scalar quantity ofthe motion vector Vc of the observation block 31 is not smaller than thethreshold vc, the CPU 10 returns to Step S5 in FIG. 3. Next, the CPU 10acquires the detected motion vectors of the observation block 31 and ofthe individual background blocks 32 of the frame image data mostrecently imaged, and repeats the above-described operations.

In other words, Steps S21 to S23 judge whether or not to automaticallyshoot an image based on the frame image data most recently imaged.

Note that the motion vector detecting section 15 computes the motionvectors of the blocks of the frame image data most recently imaged,before the reading out of the next frame image data from the CCD 5 iscompleted. In addition, the processes at Steps S5 to S23 in FIG. 3should also be completed before the reading out of the next frame imagedata from the CCD 5 is completed. In other words, the CPU 10 judgeswhether or not to automatically shoot an image for each frame image dataimaged.

As described above, according to the embodiment, image data is dividedinto a plurality of blocks. The block at the center of the photographingarea is defined as an observation block 31, and the blocks at theperiphery of the photographing area are defined as the background blocks32. In addition, an automatic shooting is performed, when the largestnumber (Max) of identical motion vectors among the motion vectors of thebackground blocks 32 is larger than the threshold m, when the scalarquantity of the motion vector with the largest number of the identicalmotion vectors is larger than the threshold v, and when the scalarquantity of the motion vector of the observation block 31 is smallerthan the threshold vc. This enables a follow shot to be automaticallyperformed with no or little blurring of the observed photographicsubject.

Further, the observation block 31 is defined as the center of aphotographing area, and the background blocks 32 are defined as theperipheral blocks of the photographing area. This enables the motionvectors of the observed photographic subject and of the background to bedetected with high accuracy, and also enables the judgment of whether ornot the user is attempting to perform a follow shot with high accuracy,and whether or not there is no blurring of the observed photographicsubject.

Furthermore, the CPU 10 judges whether or not the largest number ofidentical motion vectors (Max) among all motion vectors of thebackground blocks 32 is larger than the threshold m, whether or not thescalar quantity of the motion vector with the largest number of theidentical motion vectors is larger than the threshold v, and whether ornot the scalar quantity of the motion vector of the observation block issmaller than the threshold vc. This enables the judgment of whether ornot the user is attempting to perform a follow shot with high accuracyin a state where there is no blurring of the observed photographicsubject.

[Modifications]

The following variation example of the embodiment as described above ispossible.

(01) According to the above-described embodiment, whether or not thelargest number of identical motion vectors among all motion vectors ofthe background blocks 32 (the largest number of background blocks 32having identical motion vectors) is larger than the threshold m, andwhether or not the scalar quantity of the motion vector with the largestnumber of the identical motion vectors is larger than the threshold vare judged. However, it is only required that whether or not the scalarquantity of the motion vectors of the background region (the regionshown by hatched line in FIG. 2B) consisting of the background blocks 32is larger than the threshold v is judged. This also enables a followshot to be automatically performed with no or little blurring of theobserved photographic subject.

The motion vectors of this background region may be, for example, a meanmotion vector of the individual motion vectors of the background blocks32 or a motion vector with the number of identical motion vectors largerthan the threshold m. In other words, according to the above-describedembodiment, the motion vector should be a motion vector with the largestnumber of identical motion vectors. However, the motion vector need notbe a motion vector with the largest number of identical motion vectors,as long as the number of the identical motion vectors is larger than thethreshold m.

(02) According to the above-described embodiment, the block at thecenter of a photographing area is set as the observation block 31(observation region). However, an optional region may be set as theobservation region by the user's operation of the key input section 11.In addition, according to the above-described embodiment, the peripheralregion of the photographing area is set as the background region, andthe background blocks 32 are determined based on the background region.However, a optional region may be set as the background region by theuser's operation of the key input section 11. In this case, the blocksthat exist in this set background region should be defined as thebackground blocks 32. In some cases, when performing a follow shot, theuser prefers to image the observed photographic subject in a regionother than the center of the photographing area. In such cases, byoptionally setting the observation region and the background region bythe user's operation, it is possible to automatically perform a followshot with higher accuracy and with no or little blurring of the observedphotographic subject.

(03) According to the above-described embodiment, the threshold m, thethreshold v and the threshold vc are predetermined values. However,optional values may be set as the threshold m, the threshold v, or thethreshold vc by the user's operation of the key input section 11. Thisenables the user to optionally determine the blurring degree of anobserved photographic subject and the blurring degree of the backgroundin automatic follow shot.

(04) According to the above-described embodiment, whether or not thescalar quantity of the motion vector Vc of the observation block 31 issmaller than the threshold vc is judged, after whether or not thelargest number of identical motion vectors among all motion vectors ofthe background blocks 32 (the largest number of background blocks 32having identical motion vectors) is larger than the threshold m andwhether or not the scalar quantity of the motion vector with the largestnumber of the identical motion vectors is larger than the threshold vare judged. However, the judgment may be made in reverse order.

In this case, the operations at Steps S22 and S23 in FIG. 4 are insertedbetween Steps S5 and S6 in FIG. 3. When negative judgments are made atSteps S22 and S23, the CPU 10 returns to Step S5, and when a positivejudgment is made at Step S23, the CPU 10 proceeds to Step S6. Inaddition, when a negative judgment is made at Step S21, the CPU 10returns to Step S5, and if a positive judgment is made at Step S21, theCPU 10 proceeds to Step S24.

(05) According to the above-described embodiment, each of the backgroundblocks 32 is set as the reference block n0, and each background block 32is compared with all background blocks 32 so as to count the number ofidentical motion vectors. However, this leads to redundant judgments.Therefore, the background blocks 32, which have been set as thecomparison block n1 judged to have motion vectors identical to those ofthe background blocks 32 set as the reference block n0, may not be setas the reference block n0.

It is only required that the individual background blocks 32 are groupedfor each motion vector, and the number of background blocks 32 in thegroup having the largest number of background blocks 32, may be set asthe Max.

(06) According to the above-described embodiment, the number of theobservation block 31 is one. However, a plurality of, that is, two ormore observation blocks 31 may be used. It is only required that theobservation block 31 exists at the central region of the photographingarea, or, in the observation region set by the user.

In this case, at Step S23, as is the case with the background blocks 32,whether or not the largest number of identical motion vectors among allmotion vectors of the observation block 31 (that is, the largest numberof background blocks 32 having identical motion vectors) is larger thanthe threshold, and whether or not the scalar quantity of the motionvector with the largest number of the identical motion vectors issmaller than the threshold vc are judged. In addition, at Step S23 inthis case, whether or not the scalar quantity of a mean motion vector ofeach of the observation blocks 31 is smaller than the threshold vc maybe judged. Furthermore, at Step S23 in this case, whether or not thescalar quantity of a motion vector of the observation block 31 with thenumber of identical motion vectors larger than a threshold is smallerthan the threshold vc may be judged.

(07) According to the above-described embodiment, whether or not toautomatically shoot an image for each frame is judged. However, whetheror not to automatically shoot an image for each predetermined frame maybe judged.

(08) Furthermore, the above-described embodiment and the above-describedmodifications (01) to (07) may be optionally combined as themodification.

(09) The individual embodiments of the present invention as describedabove are merely examples as a best mode for carrying out the invention,and aims to facilitate understanding of the principle and the structureof the present invention. It is not intended to limit the scope of thepresent invention.

Therefore, it should be construed that various variations andmodifications for the above-described embodiments of the presentinvention be included in the scope of the present invention.

Lastly, in the individual embodiments as described above, a case wherean imaging apparatus of the present invention is applied to the digitalcamera 1 is described. However, the present invention is not limited tothe above-described embodiments. In other words, the present inventionmay be applied to any apparatus as long as it can shoot a photographicsubject.

Furthermore, although the processing program of the imaging apparatuswhich is a preferred embodiment of the present invention is stored inthe memory (for example, ROM, etc.) of the imaging apparatus, thisprocessing program is stored thereon a computer-readable medium andshould also be protected in the case of manufacturing, selling, etc. ofonly the program. In that case, the method of protecting the programwith a patent will be realized by the form of the computer-readablemedium on which the processing program is stored.

While the present invention has been described with reference to thepreferred embodiments, it is intended that the invention be not limitedby any of the details of the description therein but includes all theembodiments which fall within the scope of the appended claims.

1. An imaging apparatus, comprising: an imaging element; a motion vectordetecting section which detects motion vectors of a background regionand a photographic subject region based on image data imaged by theimaging element; a judging section which judges whether or not motionvectors in the background region detected by the motion vector detectingsection satisfy a first condition, and whether or not motion vectors inthe photographic subject region detected by the motion vector detectingsection satisfy a second condition; and an automatic shooting controlsection which controls the imaging element to automatically perform afollow shot, when the judging section judges that the motion vectors inthe background region satisfy the first condition and the motion vectorsin the photographic subject region satisfy the second condition; whereinthe first condition includes a condition requiring that a number ofidentical motion vectors of the background region be larger than a thirdthreshold value, and that a quantity of the motion vectors of which thenumber is larger than the third threshold value be larger than a firstthreshold value; and wherein the second condition includes a conditionrequiring that a quantity of the motion vectors be less than a secondthreshold value.
 2. The imaging apparatus according to claim 1, whereinthe first condition requires that a number of motion vectors of thebackground region that is a largest number of identical motion vectorsbe larger than the third threshold value, and that a quantity of theidentical motion vectors of which the number is the largest be largerthan the first threshold value.
 3. The imaging apparatus according toclaim 1, further comprising a threshold value setting section whichoptionally sets at least one threshold value among the first thresholdvalue, the second threshold value, and the third threshold value.
 4. Theimaging apparatus according to claim 1, wherein the background region isa peripheral region of a photographing area, and the photographicsubject region is a central region of the photographing area.
 5. Theimaging apparatus according to claim 1, further comprising a regionsetting section which optionally sets at least one of the backgroundregion and the photographic subject region.
 6. The imaging apparatusaccording to claim 1, wherein the motion vector detecting sectiondetects only motion vectors in the background region and thephotographic subject region.
 7. A non-transitory computer-readablestorage medium having a program stored thereon that is executable by acomputer including an imaging element to control the computer tofunction as elements including: a motion vector detecting section whichdetects motion vectors of a background region and a photographic subjectregion based on image data imaged by the imaging element; a judgingsection which judges whether or not motion vectors in the backgroundregion detected by the motion vector detecting section satisfy acondition requiring that a number of identical motion vectors be largerthan a third threshold value, and that a quantity of the motion vectorsof which the number is larger than the third threshold value be largerthan a first threshold value, and which further judges whether or notmotion vectors in the photographic subject region detected by the motionvector detecting section satisfy a condition requiring that a quantityof the motion vectors be less than a second threshold value; and anautomatic shooting control section which controls the imaging element toautomatically perform a follow shot, when the judging section judgesthat the motion vectors in the background region satisfy the conditionrequiring that the number of identical motion vectors be larger than thethird threshold value, and that the quantity of the motion vectors ofwhich the number is larger than the third threshold value be larger thanthe first threshold value, and that the motion vectors in thephotographic subject region satisfy the condition requiring that thequantity of the motion vectors be less than the second threshold value.